/*
  Copyright (C) 2011, Kyungjoo Kim
  
  This file is part of UHM (Unassembled HyperMatrix) sparse direct solver.
  
  All rights reserved.

  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation; either
  version 2.1 of the License, or (at your option) any later version.
  
  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  Lesser General Public License for more details.
  
  You should have received a copy of the GNU Lesser General Public
  License along with this library; if not, write to the Free Software
  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  Also add information on how to contact you by electronic and paper mail.
  
  
  Kyungjoo Kim
  iamkyungjoo@gmail.com
*/
#ifndef UHM_INTERF_PARDISO_FORT_HXX
#define UHM_INTERF_PARDISO_FORT_HXX

typedef long   uhm_fort_p;

typedef char   uhm_fort_char;
typedef int    uhm_fort_int;
typedef long   uhm_fort_long;
typedef double uhm_fort_double;

extern "C" {
  void UHM_C2F(uhm_mesh_export_matrix_pardiso)  ( uhm_fort_p   *mesh,
                                                  uhm_fort_p   *pardiso,
                                                  uhm_fort_int *n_rhs,
                                                  uhm_fort_int *is_sym );
  void UHM_C2F(uhm_pardiso_create)              ( uhm_fort_p   *pardiso,
                                                  uhm_fort_int *datatype );
  void UHM_C2F(uhm_pardiso_delete)              ( uhm_fort_p   *pardiso );
  void UHM_C2F(uhm_pardiso_is_complex)          ( uhm_fort_p   *pardiso,
                                                  uhm_fort_int *flag);
  void UHM_C2F(uhm_pardiso_set_show_n_rhs)      ( uhm_fort_p   *pardiso,
                                                  uhm_fort_int *show_n_rhs);
  void UHM_C2F(uhm_pardiso_set_phase)           ( uhm_fort_p   *pardiso,
                                                  uhm_fort_int *phase);
  void UHM_C2F(uhm_pardiso_run)                 (uhm_fort_p   *pardiso );
  void UHM_C2F(uhm_pardiso_set_iparm)           ( uhm_fort_p   *pardiso,
                                                  uhm_fort_int *idx,
                                                  uhm_fort_int *val );
  void UHM_C2F(uhm_pardiso_set_dparm)           ( uhm_fort_p   *pardiso,
                                                  uhm_fort_int *idx,
                                                  uhm_fort_double *val );
  void UHM_C2F(uhm_pardiso_init)                ( uhm_fort_p   *pardiso );
  void UHM_C2F(uhm_pardiso_analyze)             ( uhm_fort_p   *pardiso );
  void UHM_C2F(uhm_pardiso_decompose)           ( uhm_fort_p   *pardiso );
  void UHM_C2F(uhm_pardiso_solve)               ( uhm_fort_p   *pardiso );
  void UHM_C2F(uhm_pardiso_export_matrix_uhm)   ( uhm_fort_p   *pardiso,
                                                  uhm_fort_p   *mesh );
  void UHM_C2F(uhm_pardiso_finalize)            ( uhm_fort_p   *pardiso );
}

#endif
